package org.msd.controller;
import com.github.pagehelper.PageInfo;
import org.msd.model.Commodity;
import org.msd.service.iml.ZoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/home")
public class DemoController {
     @Autowired
    private ZoomService zoomService;

     @RequestMapping("/roomlist")
     @ResponseBody
      public PageInfo<Commodity> getZOOM(@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
                                         @RequestParam(value = "pageSize",defaultValue = "4")Integer pageSize){

         return zoomService.RoomQuer(pageNum, pageSize);

     }


}
